#include <iostream>
using namespace std;

int main(){
	int a, now = 0, sum = 0;
	cin >> a;
	while(cin >> a){
		if(a > now)
			sum += 6 * (a - now);
		else
			sum += 4 * (now - a);
		now = a;
		sum += 5;
	}
	cout << sum;
	return 0;
}
